I've discussed how to exchange messages between
Cloud Run services, but there is another
perspective you can take. Any process that has access to the Pub Sub API can publish
messages to a topic. Let's take a look
at receiving events from other Google
Cloud services. On Google Cloud,
various products have integration with Pub Sub. These five Services
push events to an existing topic in your
Google Cloud project. To receive the events you
attach a push subscription. Cloud Storage can post
object change events. Cloud Build can post
the build status. Artifact Registry can
post image notifications. Cloud scheduler lets you
send messages on a schedule. BigQuery can post the results
of a scheduled query. If you're looking for
another integration, that's not one of these five, there are more sources
available through Eventarc. Eventarc can send forward and filter Cloud Audit
Logs to Cloud Run. Cloud Audit Logs are
the create, read, update, and delete events
for cloud resources. They are used to register who
did what, where, and when. That's what an Audit Log does. An example event is virtual machine started
by service account X. To forward audit logs as events, create an Eventarc trigger. Eventarc standardizes
the message format with the Cloud event standard, ensuring a consistent
development experience. It's important to realize
that Cloud Audit Logs might not be the events
that you need to build the integration you want. For example, with Cloud Build, the Cloud Audit Log of a
create build event will show only that a build
has being created. The status of the
build i.e success or failure is not written
to Cloud Audit logging. Under the hood, an
event trigger is a managed pair of a topic
and a push subscription. You already know how that works. The long-term vision of Eventarc is to have it as
a hope of events for more event sources enabling a unified eventing story in
Google Cloud and beyond. That's why the
message content is standardized with Cloud events. In the future, you can expect to be able to use Eventarc to receive events from Google
Cloud sources including, for example, Firestore,
BigQuery, and Cloud storage. Other google sources,
including for example, Gmail, Google Meets and Chat, and third-party sources including
Datadog and Pager duty.